<template>
    <div>
        {{ someStore.someOneName }}
        {{ somebody }}
        <el-button @click="changeSome" type="primary">change</el-button>
    </div>
</template>

<script setup lang="ts">
import {onMounted,watch} from "vue"
import {useSomeStore} from "@/stores/someData.js"

// import ApolloClient from "@/ApolloClient/apollo"

let emit = defineEmits(["clickBtn"])

let props = defineProps({
    somebody:{
        type:String,
    }
})

watch(()=>props.somebody,()=>{
    console.log(props.somebody," changed")
})

let someStore = useSomeStore()

function changeSome(){
    someStore.setName("stiven")
    emit("clickBtn")
}

onMounted(()=>{
    // console.log("mounted",ApolloClient)
})
</script>